<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMsgLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('msg_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('openid')->default('')->comment('openid');
            $table->dateTime('sendtime')->default(null)->comment('发送时间');
            $table->string('msg')->default("")->comment('消息');
            $table->integer('status')->default(0)->comment('状态(0、未发送，1、已发送)');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('msg_logs');
    }
}
